import Main from './components/Main.js';

if (typeof $.restclient.app != "undefined") {
    $.restclient.app.unmount();
    delete $.restclient.app;
}
const Restclient = {
    components: {
        Main,
    },
    template: `<Main />`,
    provide: {
        csrf: $.restclient.csrf,
        urls: $.restclient.urls,
        version: $.restclient.version,
        max_file_size: $.restclient.urls.max_file_size,
        max_post_size: $.restclient.urls.max_post_size,
    }
};

window.addEventListener("load", function () {
    $.restclient.app = Vue.createApp(Restclient);
    $.restclient.app.mount('#content');
});

